home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3451
/
data
/
volind.dat
< prev
next >
Wrap
Text File
|
1987-04-21
|
2KB
|
42 lines
VOLUME INDICATORS IN STOS
BY EDDIE BRYAN
Hello and welcome to the first article I have written for this
issue of STOS BITS, this article is going to explain the source
code that is used to produce wicked vu meters in STOS, the source
code can be found inside the STOS folder on this disc.
Ok off we go, at line 100 to 160,a array is set up that
contains coordinate info about the location of 15 bars, these
bars are used to show the varying volumes of the 3 ST sound
channels.
The main loop does 2 things, firstly the program sets up
AREG(5) equal to the address of memory bank 5, then the 68000
code in bank 10 is CALLED, this code reads the ST's sound
channels and pokes the 3 different volumes (0-15) into the first
3 bytes found at START(5), the AREG(5)= command is used to tell
the machine code routine where to put the 3 volumes, so you can
set this to any value, the second put of the main loop SCREEN
COPIES the correct volume bar onto the physical screen.
There are 6 variables used, A/B/C/AA/BB/CC, A contains the
new volume, after the machine code routine is called, AA contains
the previous volume, these different values are used to make the
volume bars slide smoothly down, as apposed to jumping from
volume to volume.
The graphics for the volume bars are stored as a packed
picture, and is unpacked to screen 13 when the code is run.
This simple routine can be adapted to produce some great
effects, the bars can be changed to anything, such as balls that
shrink and grow, as long as you have 15 frames of animation.
Well I hope this has been of help to you.....bye Eddie Bryan.